var emipt = document.getElementById('emipt')
var psw = document.getElementById('psw')
var flag = 0
emipt.onblur = function () {
    if (this.value == '') {
        emipt.className = 'wrong'
        emipt.value = '请输入正确的电子邮箱...'
        emipt.style.color = '#999'
    }
}
emipt.onfocus = function () {
    if (this.value == '请输入正确的电子邮箱...'){
        emipt.value = ''
        emipt.style.color = '#000' 
        emipt.className = ''
        flag = 1 
    }
}
psw.onblur = function () {
    if (this.value.length < 6 || this.value.length > 16) {
        psw.type = 'text'
        psw.value = '请输入6~16位的密码'
        psw.className = 'wrong'
        psw.style.color = '#999'
    }
}
psw.onfocus = function () {
    if (this.value.length = 6 || this.value.length <= 16) {
        psw.type = 'password'
        psw.value = ''
        psw.className = ''
        psw.style.color = '#000'
    }
}